package cn.thoughtworks.school.programCenter.util;

import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;

import java.io.File;

public class CloneRepertory {
    public static void cloneRepo(String url, String branch, String destPath) throws GitAPIException {
        Git.cloneRepository()
                .setURI(url)
                .setBranch(branch)
                .setDirectory(new File(destPath))
                .call();
    }

}
